<template>
  <div>
    <button @click="handleBtn">点击设置值</button>
    <p>{{name}}</p>
    <p>{{age}}</p>
  </div>
</template>
<script>
export default {
  props:['name', 'age'],
  // emits: ['update:name', 'update:age'],
  methods: {
    handleBtn () {
      this.$emit('update:name', 'new-name')
      this.$emit('update:age', 100)
    }
  }
}
</script>

